Dynomotion

Group: DynoMotion Message: 11407 From: tmday7 Date: 4/16/2015
Subject: Using VisualStudio Community 2013
Hello,
 Has anyone used Visual Studio Community 2013 to alter KMotion CNC?
When i try to rebuild KMotion CNC i get the following Warning and Errors.....

Warning  1  warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be removed in a future version of MFC.    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h   (Line) 38    (Column)1   (Project) KMotionCNC

Error  2  error C2556: 'int round(double)' : overloaded function differs only by return type from 'double round(double)'    e:\kmotion432\pc vc examples\kmotioncnc\lib3d\Utils3d.h    (Line)15    (Column)1    (Project)KMotionCNC

Error  3  error C2371: 'round' : redefinition; different basic types    e:\kmotion432\pc vc examples\kmotioncnc\lib3d\Utils3d.h    (Line)15    (Column)1   (Project) KMotionCNC

Thanks for any help,
Troy


Group: DynoMotion Message: 11408 From: Sam Marrocco Date: 4/16/2015
Subject: Re: Using VisualStudio Community 2013
Perhaps you are on too new a version of vs and the code will have to be updated in order to compile? 

On Apr 16, 2015, at 7:17 AM, tmday88@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Hello,
 Has anyone used Visual Studio Community 2013 to alter KMotion CNC?
When i try to rebuild KMotion CNC i get the following Warning and Errors.....

Warning  1  warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be removed in a future version of MFC.    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h   (Line) 38    (Column)1   (Project) KMotionCNC

Error  2  error C2556: 'int round(double)' : overloaded function differs only by return type from 'double round(double)'    e:\kmotion432\pc vc examples\kmotioncnc\lib3d\Utils3d.h    (Line)15    (Column)1    (Project)KMotionCNC

Error  3  error C2371: 'round' : redefinition; different basic types    e:\kmotion432\pc vc examples\kmotioncnc\lib3d\Utils3d.h    (Line)15    (Column)1   (Project) KMotionCNC

Thanks for any help,
Troy



sam marrocco | chief technical officer
ringside.cutters.picnic.moonlink

248 548 2500 w
248 910 3344 c

ringsidecreative.com

Group: DynoMotion Message: 11409 From: Tom Kerekes Date: 4/16/2015
Subject: Re: Using VisualStudio Community 2013
Hi Troy,

Its great you are trying that.  My understanding is that is equivalent to Microsoft Visual Studio Professional but Free (Except for Enterprises) !

The error is caused because in:

C:\KMotion432\PC VC Examples\KMotionCNC\Lib3D\Utils3d.cpp

There is a "round" function we included that conflicts with a function Microsoft added with the same name.  Turns out we no longer use that function anyway so simply remove it like we already did in the newer Test Versions.  Remove the code shown below.

You can just ignore the depreciated warning.

HTH
Regards
TK 

int round(double x)
{
    int _ceil = (int)ceil(x);
    int _floor = (int)floor(x);
    if((_ceil-x) < (x-_floor))
        return _ceil;
    else
        return _floor;
}

Group: DynoMotion Message: 11413 From: tmday7 Date: 4/16/2015
Subject: Re: Using VisualStudio Community 2013
Hi Tom,
 This removed the error and the rebuild was successful but with over 104 warnings.
And when i tried to launch or Start Dubugging using F5, i get a Visual Studio window stating" Unable to start program'C:\Kmotion432\PC VC Examples\BuildExanples\.\Release\KMotionCNC.exe' The system cannot find file specified.
Why is it looking for the KMotionCNC.exe in this location?

Thanks,
Troy
Group: DynoMotion Message: 11414 From: Tom Kerekes Date: 4/16/2015
Subject: Re: Using VisualStudio Community 2013
Hi Troy,

I've found that when upgrading our VS2008 projects to newer VS version some of the file locations and directories in the project properties are changed.  Go into the project properties and change them back so that the output file is placed into the C:\KMotion432\KMotion\Release directory with all the other required dlls and exes.

To verify it is indeed placing the file in the right place you might delete it or check the time stamp to verify it was actually re-built and placed there.

Regards
TK

Group: DynoMotion Message: 11415 From: tmday7 Date: 4/16/2015
Subject: Re: Using VisualStudio Community 2013
Last post ..... I made a typo, this 'C:\Kmotion432\PC VC Examples\BuildExanples\.\Release\KMotionCNC.exe'
should be this...
'E:\Kmotion432\PC VC Examples\BuildExanples\.\Release\KMotionCNC.exe'

Troy
Group: DynoMotion Message: 11416 From: tmday7 Date: 4/16/2015
Subject: Re: Using VisualStudio Community 2013
Hi Tom, :)
 Changed the directory as you said and renamed original .exe. After Rebuilding KmotionCNC there is indeed a new .exe created and iam able to use F5 and Start Debugging/launching KMotionCNC.
The Warning list has reduced to 50
.
One being...
 Warning   1   warning : Access to the path 'e:\kmotion432\kmotion\release\kmotion_dotnet.xml' is denied.  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppClean.targets  

And the other 49 are...
Warning    2    warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be removed in a future version of MFC.    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h    38    1    KMotionCNC



Before i changed the directory in the Project Properties i made some changes to my custom dialog, saved it and Rebuild KMotionCNC. Then i launched KMotionCNC using the KMotionCNC.exe thats in the directory E:\Kmotion432\PC VC Examples\BuildExanples\.\Release\
And the changes i made to my custom dialog face where there. Seems as if VS was still saving it. But anyhow just some info. I am documenting the process of using VisualStudioCommunity2013, ill post it in the files section.

Thanks again,
Troy
Group: DynoMotion Message: 11417 From: Paul Sorey Date: 4/16/2015
Subject: Re: Using VisualStudio Community 2013
If you get tired of all the warnings, right click on your solution, go
to Properties, under c/c++ set warning level /W0. At least that's how
it works in VC++ 2012

Paul